package NGUYENVANDOAN.OOP.EXCERCISES.LEVEL02.EX01_OPTIONAL;

public class Octagon {
    private double side = 0;

    public Octagon(double side) {
        this.side = side;
    }

    /**
     * @return the side
     */
    public double getSide() {
        return side;
    }

    /**
     * @param side the side to set
     */
    public void setSide(double side) {
        this.side = side;
    }
    
    public double Area(Octagon objOctogon){
        return (2 + 4 / Math.sqrt(2) * 
                        objOctogon.getSide() * 
                        objOctogon.getSide());
    }
}
